from openai import OpenAI
from globle import configs as cfg
client = OpenAI(api_key=cfg.DEEPSEEK_API_KEY, base_url="https://api.deepseek.com")

def do():
    response = client.chat.completions.create(
        model="deepseek-chat",
        messages=[
            {
                    "role": "user",
                    "content": '''如果后天是星期二，那么昨天是星期几？
                               "你需要按照如下步骤思考："
                               "1. 先思考今天是星期几。"
                               "2. 然后根据今天推理昨天是星期几。"
                               "只需最终答案，不要中间废话。'''
            },
        ],
        temperature=0,
        stream=True

    )
    return response

r = do()
for chunk in r:
    print(chunk.choices[0].delta.content,end="")
